<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <link href="layui/css/layui.css" rel="stylesheet">
        <link href="index.css" rel="stylesheet">
    </head>
    <body style="background-color: #FFF;">
        <ul class="layui-nav layui-bg-gray" lay-filter="nav">
            <li class="layui-nav-item layui-this"><a k="setting">设置</a></li>
            <li class="layui-nav-item"><a k="local">本地书签</a></li>
            <li class="layui-nav-item"><a k="remote">远程书签</a></li>
          </ul>
          <div id="setting" class="nav_panel layui-container">
            <form class="layui-form layui-form-pane" action="" lay-filter="setting_form">
              
                <div class="layui-form-item">
                    <div class="layui-inline">
                      <label class="layui-form-label">Token <i id="tips_token" class="layui-icon layui-icon-tips layui-font-12"></i> </label>
                      <div class="layui-input-block">
                        <input type="password" name="token" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input" lay-affix="eye">
                      </div>
                    </div>
                    <div class="layui-inline">
                      <label class="layui-form-label">分支</label>
                      <div class="layui-input-block">
                        <input type="text" name="branch" placeholder="master" autocomplete="off" class="layui-input">
                      </div>
                    </div>
                </div>
                <div class="layui-form-item">
                  <div class="layui-inline">
                    <label class="layui-form-label">用户名 <i id="tips_user" class="layui-icon layui-icon-tips layui-font-12"></i></label>
                    <div class="layui-input-block">
                      <input type="text" name="username" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                  </div>
                  <div class="layui-inline">
                    <label class="layui-form-label">仓库 <i id="tips_store" class="layui-icon layui-icon-tips layui-font-12"></i></label>
                    <div class="layui-input-block">
                      <input type="text" name="storehouse" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                  </div>
                </div>
                <div class="layui-form-item layui-form-text">
                  <label class="layui-form-label">远程书签文件目录 <i id="tips_remote" class="layui-icon layui-icon-tips layui-font-12"></i></label>
                  <div class="layui-input-block">
                    <input type="text" name="remote_folder" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                  </div>
              </div>
              <table class="layui-hide" id="local_table"></table>
              <div class="layui-form-item">
                <div class="layui-btn-container setting-btn">
                  <button type="submit" class="layui-btn layui-btn-radius " lay-submit lay-filter="setting_save">保存</button>
                  <button id="refresh" type="button" class="layui-btn layui-btn-radius ">重新加载</button>
                </div>
              </div>
            </form>
          </div>
          <div id="local" class="display_none  nav_panel layui-container">
            <div class="layui-row">
              <div class="layui-col-xs3 ">
                  <form id="localBookmarkForm" lay-filter="localBookmarkForm" class=" layui-form">
                  </form>
              </div>
              <div class="layui-col-xs9">
                <div class="layui-btn-container">
                  <button id="localReload" type="button" class="layui-btn layui-bg-blue">加载（刷新）</button>
                  <button id="localPush" type="button" class="layui-btn layui-bg-blue">
                    <i class="layui-icon layui-icon-upload-drag"></i>推送本地书签到仓库</button>
                </div>
                <div id="localTree">无数据</div>
              </div>
            </div>
          </div>
          <div id="remote" class="display_none nav_panel layui-container">
            <div class="layui-btn-container">
              <button id="remoteReload" type="button" class="layui-btn layui-bg-red">加载（刷新）</button>
              <button id="remoteDownload" type="button" class="layui-btn layui-bg-red">
                <i class="layui-icon layui-icon-download-circle"></i>下载仓库书签到本地</button>
            </div>

            <div id="remoteTree">无数据</div>
          </div>
        <script id="localBookmark"  type="text/html">
          {{#  layui.each(d.list, function(index, item){ }}
          <input type="radio" name="localCheck" value="{{= index}}" title="{{= item.alias}}" 

          {{#  if(item.dir == null || item.dir == ''){ }}
          disabled 
          {{#  } }}

          {{#  if(item.checked){ }}
          checked
          {{#  } }}
          >
          <div lay-radio>
            <span >({{= item.index}}) {{= item.alias}} </span><br>
          </div>     
          <br>     
          {{#  }); }}
          
        </script>
        <script src="layui/layui.js"></script>
        <script src="axios.min.js"></script>
        <script src="base64.js"></script>
        <script src="index.js"></script>
    </body>
</html>